﻿// /*
//  * @Author: wanyiming
//  * @Date:2024-06-12-21:43
//  * @Description:
//  */

using System;
using Code.GameLogic.BaseClass;
using Code.GameLogic.Common;
using TMPro;
using UnityEngine;

namespace Code.GameLogic.World.UI
{
    public class WorldUI:AbsGameLogicUI
    {
        private GameObject _mainCanvas;

        private GameObject _worldUI;

        private TextMeshProUGUI _monsterValue;
        
        
        public override void LoadManagerData()
        {
            _mainCanvas = GameObject.Find("MainCanvas");
            
        }


        public override void CreateGameObj()
        {
            _worldUI = (GameObject)Resources.Load("UI/世界/WorldUI");
            _worldUI = Instantiate(_worldUI, _mainCanvas.transform);
            
            _monsterValue= _worldUI.transform.Find("Lab/MonsterValue").GetComponent<TextMeshProUGUI>();
            
        }


        private void Update()
        {
            FlashUIValue();
        }

        private void FlashUIValue()
        {
            _monsterValue.text = GlobalCommon.MonsterUIVo.MonsterNum.ToString();

        }






    }
}